<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../Public/js/jquery-1.7.1.min.js"></script>
<title>博文详细内容</title>
<style>
body {
	background:#ffffff;
	margin:0px;	
}
a{
    text-decoration: none;
    color:#24b33b;
}
div{
	margin:0px;
	margin-left:auto;
	margin-right:auto;
	/*border:solid ;
	border-color:#Ff0000;*/
	}
div{
	margin-left:auto;
	margin-right:auto;
	}
.tab{
	border:thin solid #d0d0d0;
	float:left;
	height:39px;
	border-bottom:none;
	line-height:39px;
	font-size:16px;
	color:#626262;
	text-align:center;
	width:80px;
	font-weight:bold;
	cursor:pointer;
	}	
.setab{
	background:#d8f3fe;
	color:#1f9692;
	}	
.one{
    float: left;
    margin-left: 10px;
    height:50px; 
    font-size: 12pt;
} 
 .options{
	height:30px;
	width:170px;
	border-bottom:dotted #e3e3e3 1px;
	cursor:pointer;
	}   
.myfontstyle{
    font-family:'黑体';
    letter-spacing:1px;
}

</style>
</head>
<script type="text/javascript">
$(document).ready(function(){  
    $("#comm").keydown(function(){  
        var curLength=$("#comm").val().length;   
        if(curLength>=50){  
            var num=$("#comm").val().substr(0,50);  
            $("#comm").val(num);  
            alert("超过字数限制，多出的字将被截断!");  
        }  
        else{  
            var no = $("#comm").val().length;
            no=no+"/50";
            $("#textCount").text(no);  
        }  
    })  
});
function addComm(){   
    var comment=$("#comm").val();    
    var nid=$("#nid").val();   
    $('#commpart').css('display','block');
    $.post("{:U('Note/addNoteComment')}",{comment:comment,nid:nid},function(data){
          var jsonObj = $.parseJSON(data);
         if(jsonObj.data!=""||jsonObj.data!=null){
          var url = "noteinfo/n_id/"+nid;
          window.location.href="{:U('"+url+"')}";
          }
          else
          {
            alert("更新失败");
          }
       //  var jsonObj = $.parseJSON(data);
//        $('#commpart').append("<div class='one' id='disName' style='width:15%;font-size:10pt;color:#047f80;'>"
//         +jsonObj.data['p_name']+"</div><div class='one' id='disContent' style='width:60%;font-size:10pt;'>"
//         +jsonObj.data['content']+"</div><div class='one' id='disTime' style='width:15%;text-align: right;font-size:6pt;font-style:oblique;'>"
//         +jsonObj.info+"</div>");
//        $('#comm').attr('value','');  
     });
}
 function editnote(nid){
   if(nid == 0){
        alert("删除失败，请重新刷新");
    }else{
     var url = "editNote/nid/"+nid;
     window.location.href = "{:U('"+url+"')}";
    }
 }
 function deletenote(nid){
    if(nid == 0){
        alert("删除失败，请重新刷新");
    }else{
     var url = "deletNote/nid/"+nid;
     window.location.href = "{:U('"+url+"')}";
    }
 }
 function selectitem(index){
   switch(index){
    case 0:
    window.location.href="{:U('Public/tohome')}"
    break;
    case 1:
    window.location.href="{:U('Upload/uploadpicture')}"
    break;
    case 2:
    window.location.href="{:U('Note/addBlog')}"
    break;
    case 3:
    window.location.href="{:U('First/Index')}"
    break;
    case 4:
    window.location.href="{:U('Favorite/Index')}"
    break;
    case 5:
    window.location.href="{:U('Video/addVideo')}"
    break;
    case 6:
    window.location.href="{:U('Growth/Index')}"
    break;
    case 7:
    window.location.href="{:U('Timeshow/Index')}"
    break;
   }
}

</script>
<body>
<div style="margin-top:2%;width:100%;">
	<div style="float:left;width:67%;margin-top:2%;">
    <!--logo开始-->
	<!--	<div id='community_title' style="width:90%;height:52px;">
			<div id="logo" style="width:20%;border-right:solid thin #b9b9b9;height:52px;float:left; background:url(../Public/note/image/logo.png) no-repeat center center;">
			</div>	
		</div>-->
     <!--logo结束--> 
  <!--标题栏开始-->  
		<div style="width:90%;height:40px; background:#ecf9fe; border: thin solid #dee3e3; margin-top:10px;">
			<div class="tab setab myfontstyle" style="width:120px;">上传Tang组</div>
   		</div>
      <!--标题栏结束-->  
 	 <!--最左区域-->
		<div  style="width:90%;background:#f7fcfe;border-top:none;border:thin solid #dee3e3;"> 
		
<!--讨论题开始-->
        <input type="text" id="nid" name="nid" value="{$noteinfo.n_id}" style="display: none;" />
			<div style="width:95%;margin-left:20px;margin-top:30px; height:100px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
            	<div style="float:left;width:100%">
                	<div style="float:left;width:15%;">
                    	<div style="background:url(../Public/note/image/notelogo.png) no-repeat; height:91px;width:84px;"></div>
                    </div>
                    <div style="float:right;width:82%;margin-left:2%;">
                    	<div style="width:100%;height:36px;">
                    		<div style="float:left;background:url(../Public/discuss/image/m_greenline.png) repeat-x left bottom;width:95%;height:36px; line-height:36px;color:#24b33b;font-weight:bold;font-size:14pt;">{$noteinfo.title}</div>
                        	<div style="float:left;background:url(../Public/discuss/image/greenline.png) no-repeat left bottom;width:4%;height:36px; line-height:36px;color:#888888;font-size:11pt; font-style:oblique;"></div>
                    	</div>    
                    	<div class="myfontstyle" style="float:right;height:50px;width:100%;font-size:10pt;color:#8b8c8e;padding-top:10px;">{$noteinfo.p_name.name}&nbsp;&nbsp;{$noteinfo.ctime}</div>
                    </div>
                </div>
            </div>
   
<!--讨论题结束-->
<!--详细介绍开始-->
			<div style="width:95%;margin-left:20px;height:250px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
            	<div style="float:left;width:100%">
                    <div style="float:right;width:100%;height:200px;">                      
                    	<div style="height:200px;width:100%;font-size:12pt;color:#8b8c8e;padding-top:10px;line-height:23px;">&nbsp;&nbsp;&nbsp;&nbsp;{$noteinfo.content}</div>
                    </div>
                </div>
            </div>
<!--详细介绍结束-->


<!--评论列表开始-->

			<div style="width:95%;margin-left:20px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
            	<div style="float:left;width:100%;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
                 <!--	<div style="float:left;width:15%;">
                    	
                    </div>-->
                    <div style="float:right;width:97%;">
                        <div class="myfontstyle" id="commpart">
                            <volist name="commnetList" id="vo">
                                <div class="one" style="width:15%;font-size:10pt;color:#047f80;">{$vo.p_name}</div>
                                <div class="one" style="width:60%;font-size:10pt;">{$vo.content}</div>
                                <div class="one" style="width:15%;text-align: right;font-size:6pt;font-style:oblique;">{$vo.ptime}</div>
                             </volist> 
                              <div class="myfontstyle" id="pageid" style="float:right;width:100%;clear:both;font-size:6pt;text-align:center;height:25px;">{$page}</div>
                         </div>               	
                    </div>
                </div>
            </div>


<!--评论列表结束-->
<!--评论栏开始-->
    	<div style="width:95%;margin-left:20px;height:60px; clear:both;">

            	<div style="float:left;width:100%">
                	<div style="float:left;width:15%;height:50px;">
                    	<div style="background:url(../Public/discuss/image/review.png) no-repeat;width:61px;height:28px;cursor:pointer;" onclick="addComm()"></div>
                    </div>
                    <div style="float:right;width:85%;height:50px;">                                             
                    	<textarea id="comm" name="comm" style="width:95%;height:34px;" ></textarea>
                        <div style="margin-top:2px; float:left;width:45px;height:14px;line-heght:14px;font-size:10pt;text-align:right;color:#9b9b9b;cursor:pointer;"><span id="textCount" class="myfontstyle">0/50</span></div>          
                    </div>
                </div>
            </div>
  
<!--评论栏结束-->
        </div><!--最左区域-->	  
   </div><!--内容结束-->
   
<div style="float:left;width:3%;background:url(../Public/discuss/image/m_line.png) no-repeat right center;height:600px; "></div><!--中线-->
<!--公告开始-->
<div style="float:left;width:30%;">
	<div style="background:url(../Public/note/image/back.png) no-repeat;width:210px;height:214px;margin-top:20px;padding-top:50px;">
    <!--	<div style="width:80%;color:#A0A0A0;font-size:10pt;">&nbsp;&nbsp;您也许注册了一堆博客、微博，那里纷繁复杂的界面和无处不在的广告是否让你晕头转向、毫无兴致？Tang日志的设计非常简洁轻快，让您快速舒畅地记录关于宝宝的生活感触，因为Tang还知道，您每天照顾宝宝的一切，已经很忙了。
        </div>-->
    </div>
</div>
<div  id="role" style="float:left;width:30%;">
    	<div class="options" style="background:url(../Public/child/image/home.png) no-repeat;" onclick="selectitem(0)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addphoto.png) no-repeat;" onclick="selectitem(1)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addvideo.png) no-repeat;" onclick="selectitem(5)"></div>	
    	<div class="options" style="background:url(../Public/child/image/marker.png) no-repeat;" onclick="selectitem(3)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addfavourite.png) no-repeat;" onclick="selectitem(4)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addnote.png) no-repeat;" onclick="selectitem(2)"></div>	
    	<div class="options" style="background:url(../Public/child/image/grow.png) no-repeat;" onclick="selectitem(6)"></div>	
    	<div class="options" style="background:url(../Public/child/image/timeshow.png) no-repeat;" onclick="selectitem(7)"></div>		
    </div>
<!--公告结束-->
</div><!--全局框结束-->      
<img src="../Public/note/image/flower.png" style="position:absolute;right:0;bottom:0; z-index:-50;" />	
</body>
</html>